<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Make Controller Kit - Firmware API: stepper.c File Reference</title>
<link href="mt_doxygen.css" rel="stylesheet" type="text/css" />
<link href="../resources/mt_doxytabs.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.header {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12pt;
	color: #222222;
}
-->
</style>
</head>

<body>
<table width="800" border="0">
    <tr>
      <td colspan="3">
        <form method="get" action="http://www.google.com/search">
          <div align="right">
            <input type="text"   name="q" size="25"
              maxlength="255" value="" />
            <input type="submit" value="Search" />
            <input type="hidden" name="sitesearch" value="makingthings.com/ref/firmware/html" />
          </div>
        </form>
       </td>
    </tr>
    <tr>
      <td><div align="center"><a href="http://www.makingthings.com">
				<img src="../resources/logo_brown_medium.png" alt="MakingThings"
									width="200" height="78" border="0" align="middle" longdesc="http://www.makingthings.com" /></a></div></td>
				<td><div align="center" class="header">
      		Make Controller Kit <br />
          Firmware API
      </div></td>
      <td><div align="center"><a href="http://www.makezine.com">
					<img src="../resources/make_logo.png" alt="MAKE Zine" 
										width="164" height="73" border="0" align="middle" longdesc="http://www.makezine.com" /></a></div></td>
    </tr>
</table>
</body>
</html>
<!-- Generated by Doxygen 1.5.4 -->
<script type="text/javascript">
<!--
function changeDisplayState (e){
  var num=this.id.replace(/[^[0-9]/g,'');
  var button=this.firstChild;
  var sectionDiv=document.getElementById('dynsection'+num);
  if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
    sectionDiv.style.display='block';
    button.src='open.gif';
  }else{
    sectionDiv.style.display='none';
    button.src='closed.gif';
  }
}
function initDynSections(){
  var divs=document.getElementsByTagName('div');
  var sectionCounter=1;
  for(var i=0;i<divs.length-1;i++){
    if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
      var header=divs[i];
      var section=divs[i+1];
      var button=header.firstChild;
      if (button!='IMG'){
        divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
        button=document.createElement('img');
        divs[i].insertBefore(button,divs[i].firstChild);
      }
      header.style.cursor='pointer';
      header.onclick=changeDisplayState;
      header.id='dynheader'+sectionCounter;
      button.src='closed.gif';
      section.id='dynsection'+sectionCounter;
      section.style.display='none';
      section.style.marginLeft='14px';
      sectionCounter++;
    }
  }
}
window.onload = initDynSections;
-->
</script>
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="classes.html"><span>Data&nbsp;Structures</span></a></li>
    <li class="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul>
</div>
<h1>stepper.c File Reference</h1>Stepper Motor Controls. <a href="#_details">More...</a>
<p>

<p>
<a href="stepper_8c-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___stepper.html#g83de2fe1e21adca834585e4e1e98d536">Stepper_SetActive</a> (int index, int state)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attempt to set the specified Sets whether the specified Stepper is active.  <a href="group___stepper.html#g83de2fe1e21adca834585e4e1e98d536"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___stepper.html#ga65f212117be231d54ff67cb00911e3d">Stepper_GetActive</a> (int index)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check whether the stepper is active or not.  <a href="group___stepper.html#ga65f212117be231d54ff67cb00911e3d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___stepper.html#g83dbabc60bf20269330dddda711afe4e">Stepper_SetPosition</a> (int index, int position)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the position of the specified stepper motor.  <a href="group___stepper.html#g83dbabc60bf20269330dddda711afe4e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___stepper.html#g3172137d4ac0546433c2e85d2b4ead68">Stepper_SetPositionRequested</a> (int index, int positionRequested)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the destination position for a stepper motor.  <a href="group___stepper.html#g3172137d4ac0546433c2e85d2b4ead68"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___stepper.html#g891becfba02cc46ee2271ac31a1562ab">Stepper_SetSpeed</a> (int index, int speed)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the speed at which a stepper will move.  <a href="group___stepper.html#g891becfba02cc46ee2271ac31a1562ab"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___stepper.html#g174186367248f68a9a33228625577cf5">Stepper_GetSpeed</a> (int index)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the speed at which a stepper will move.  <a href="group___stepper.html#g174186367248f68a9a33228625577cf5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___stepper.html#gd041059f1c047e9487ec1184f4f00d84">Stepper_GetPosition</a> (int index)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read the current position of a stepper motor.  <a href="group___stepper.html#gd041059f1c047e9487ec1184f4f00d84"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___stepper.html#gf150638da28e7c58bc09c0cf1b6f3791">Stepper_GetPositionRequested</a> (int index)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read the destination position of a stepper motor.  <a href="group___stepper.html#gf150638da28e7c58bc09c0cf1b6f3791"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___stepper.html#gb212bd8775ecb72a0d56163fdf613928">Stepper_Step</a> (int index, int steps)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Simply take a number of steps from wherever the motor is currently positioned.  <a href="group___stepper.html#gb212bd8775ecb72a0d56163fdf613928"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___stepper.html#g2670d5168bc4403656d3bb65c05ddf37">Stepper_GetStep</a> (int index)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Not implemented - returns 0.  <a href="group___stepper.html#g2670d5168bc4403656d3bb65c05ddf37"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___stepper.html#g4b8735adfa88cfbf0dc4be5561f8e44f">Stepper_SetDuty</a> (int index, int duty)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the duty - from 0 to 1023.  <a href="group___stepper.html#g4b8735adfa88cfbf0dc4be5561f8e44f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___stepper.html#gaf6cb1e49032eed0e16db704ac02396b">Stepper_GetDuty</a> (int index)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the duty Read the value previously set for the duty.  <a href="group___stepper.html#gaf6cb1e49032eed0e16db704ac02396b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___stepper.html#geb71bfe520e3eacd08417313ffd7f71e">Stepper_SetBipolar</a> (int index, int bipolar)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Declare whether the stepper is bipolar or not.  <a href="group___stepper.html#geb71bfe520e3eacd08417313ffd7f71e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___stepper.html#g43c21812439f70eea1e0cf7fb7f8649c">Stepper_GetBipolar</a> (int index)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the bipolar setting Read the value previously set for bipolar.  <a href="group___stepper.html#g43c21812439f70eea1e0cf7fb7f8649c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___stepper.html#g731a93f003fa86a34cbde312dd1193d7">Stepper_SetHalfStep</a> (int index, int halfStep)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Declare whether the stepper is in half stepping mode or not.  <a href="group___stepper.html#g731a93f003fa86a34cbde312dd1193d7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___stepper.html#ga5ef21727e1a4bb101aa378c4782e7df">Stepper_GetHalfStep</a> (int index)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read whether the stepper is in half stepping mode or not.  <a href="group___stepper.html#ga5ef21727e1a4bb101aa378c4782e7df"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Stepper Motor Controls. 
<p>
Methods for controlling up to 2 stepper motors with the Make Application Board. 
<p>Definition in file <a class="el" href="stepper_8c-source.html">stepper.c</a>.</p>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Make Controller Kit</title>
<style type="text/css">
<!--
.footer {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 9pt;
	color: #999999;
}
-->
</style>
</head>

<body>
<hr size="1">
<div>
  <p class="footer">The Make Controller Kit is an open source project maintained by <a href="http://www.makingthings.com">MakingThings</a>.<br />
    MakingThings code is released under the <a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">Apache 2.0 license</a>.<br />
    Bug tracker, development wiki and status can be found at <a href="http://dev.makingthings.com">http://dev.makingthings.com</a>.<br />
		This document was last updated on 5 Dec 2007.
</p>
</div>
<!-- Google Analytics Code -->
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-769030-1";
urchinTracker();
</script>
</body>
</html>
